/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Administrator
 */
public class Node<E> {
    private E value;
    private Node<E> nextItem;

    public Node(E tval, Node<E> tItem){
        this.value = tval;
        this.nextItem = tItem;
    }

    public Node(E tval){
        this(tval,null);
    }

    public void setNext(Node<E> tItem){
        nextItem = tItem;
    }

    public void setValue(E tval){
        value = tval;
    }

    public Node<E> getNext(){
        return (nextItem);
    }

    public E getValue(){
        return value;
    }

    public boolean hasNext(){
        if (nextItem != null)
            return(true);
        return(false);
    }
}